package com.yuntsg.nnsfcp.front.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuntsg.nnsfcp.front.entity.UserInfo;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 这是用户信息表 Mapper 接口
 * </p>
 *
 * @author gcr
 * @since 2020-06-11
 */
public interface UserInfoMapper extends BaseMapper<UserInfo> {

    /**
     * 通过订单号,得到一个订单下用户的作者名-9中变体(英文)
     *
     * @param orderId 订单id
     * @return
     */
    @Select("select u.author_en from order_base_info as o left join user_info as u on o.user_id = u.id where o.apply_id = #{orderId}")
    public String getUserAuthorEn(String orderId);
}
